<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Print Document</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.grid_12
{
	width:900px; padding-bottom:10px;
	float: left;
}
.grid_2
{
	float:left; width:150px;
	height:20px;
}
.grid_4
{
	float:left; width:300px;
	height:20px;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
hr {
  	color: #CCC;
	background-color: #F5F5F5;
	height: 1px;
}
-->
</style>
</head>

<body>
<?php $order = $this->order;?>
<div style="position:fixed; font-weight:bold; top:5px; right:5px;"><a href="javascript:print();">Print</a></div>

<div style="padding: 5px; font-size: 28pt; font-weight: bold;">Capitol Custom Suit</div> 
<div style="padding: 5px; font-size: 16pt; font-weight: bold;">Invoice number <?php echo $order->order_invoice;?></div>

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td><table border="0" cellpadding="5" cellspacing="0">
      <tr>
		<!--
        <td><?php echo $this->translator('order_id'); ?>:</td>
        <td><?php echo $order->order_id;?></td>
		-->
        <td><?php echo $this->translator('order_status'); ?>:</td>
        <td><?php echo $this->translator('order_'.$order->order_status);?></td>
      </tr>
      <tr>
        <td><?php echo $this->translator('order_created_date'); ?></td>
        <td><?php echo $order->order_created_date;?></td>
        <td>
        <?php if(@$this->role->name != 'employee'):?>
            <?php echo $this->translator('order_total_amount'); ?>:
            <?php endif;?></td>
        <td>
        <?php if(@$this->role->name != 'employee'):?>
            <?php echo $order->order_total_amount;?> <?php echo $order->order_total_amount_currency;?>
            <?php endif;?>
        </td>
      </tr>
      <?php if ($order->order_edited == 1):?>
      <tr>
        <td><?php echo $this->translator('order_modify_date'); ?>:</td>
        <td><?php echo $order->order_modified_date;?></td>
        <td>
        <?php if(@$this->role->name != 'employee'):?>
            <?php echo $this->translator('order_modify_amount'); ?>:
            <?php endif;?>
        </td>
        <td>
        <?php if(@$this->role->name != 'employee'):?>
            <?php echo $order->order_modify_amount;?> <?php echo $order->order_modify_amount_currency;?>
            <?php endif;?>
        </td>
      </tr>
      <?php endif;?>
	  <?php if($this->role->name != 'employee'):?>
	  <tr>        
        <td>&nbsp;</td>
        <td>&nbsp;</td>
		<td><?php echo $this->translator('order_total_shipping_cost'); ?>:</td>
        <td><?php echo $order->order_total_shipping_cost;?> USD</td>
      </tr>
	  <?php endif;?>
      <tr>
        <td><?php echo $this->translator('order_customer'); ?>:</td>
        <td><?php echo $this->translator('order_customer_id'); ?>: <?php echo $order->customer_id;?></td>
        <td><?php echo $this->translator('order_customer_name'); ?>:</td>
        <td><?php echo $order->full_name;?></td>
      </tr>
      
      <tr>
        <td><?php echo $this->translator('order_tracking_status'); ?>:</td>
        <td><?php echo $this->translator('order_'.$order->order_tracking_status);?></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="300" valign="top"><strong><?php echo $this->translator('order_product_name'); ?></strong></td>
        <td width="300" valign="top"><strong><?php echo $this->translator('order_values'); ?></strong></td>
        <td width="50" valign="top"><strong><?php echo $this->translator('order_quantity'); ?></strong></td>
        <td valign="top"><strong><?php echo $this->translator('order_amount'); ?></strong></td>
      </tr>
      <?php foreach ($this->products as $row):?>
      <tr>
        <td valign="top">
        <?php if($row->order_detail_parent_id != null):?>
                    --- <?php echo $row->product_admin_name?>
                <?php else:?>
                    <?php echo $row->product_admin_name?>
                <?php endif;?>
                &nbsp;
        </td>
        <td valign="top">
        <?php $arrAttributeValue = $this->arrAttributeValue[$row->product_id];?>
            <?php $i = 0; foreach ($this->arrAttribute[$row->product_id] as $row1):?>
                <?php $i++; if(count($this->arrAttribute[$row->product_id]) == $i):?>
                    <?php $str = '';?>
                <?php else :?>
                    <?php $str = '<br>';?>
                <?php endif;?>

                <?php foreach ($arrAttributeValue[$row1->attribute_type_id] as $row2):?>
                    <?php if(strstr($row->product_value_type_id_chain,','.$row2->value_type_id.',')):?>
                        <b><?php echo $row1->attribute_type_admin_name;?></b>: <?php echo $row2->value_type_name;?>
                    <?php endif;?>
                <?php endforeach;?>
                <?php echo $str;?>
            <?php endforeach;?>
            &nbsp;        
        </td>
        <td valign="top">
        <?php echo $row->order_detail_quantity?>
            &nbsp;
        </td>
        <td valign="top">
        <?php if($row->order_detail_parent_id != null):?>
                &nbsp;
            <?php else:?>
                <?php if($this->role->name != 'employee'):?>
                <?php //echo $row->order_detail_quantity*$row->product_price?> 
                <?php echo $row->order_detail_product_price;?> 
				<?php echo $row->product_price_currency?>
                <?php endif;?>
            &nbsp;
            <?php endif;?>
        </td>
      </tr>
      <?php endforeach;?>
    </table></td>
  </tr>
</table>
</body>
</html>
